<?php
class TextArea extends FormElement {

	public function __construct($elementId, $labelText) {
	
		parent::__construct($elementId, $labelText);
	}
	
	protected function renderElement() {
	
		$hiddenLabelClass = '';
		if ($this->labelVisibility == Label::$labelHidden) {
			$hiddenLabelClass = 'class="ui-hidden-accessible"';
		}
	
		echo '<label for="', $this->elementId, '" ', $hiddenLabelClass, ' >', $this->labelText, '</label>';
		echo '<textarea name="', $this->elementId, '" ', $this->formatAttributes(), '>';
		echo $this->getDefaultValue();
		echo '</textarea>';
	}
}
?>